package com.amt.olcacon.mapper;

import com.amt.olcacon.entity.ImpactCategoryEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ImpactCategoryMapper extends BaseMapper<ImpactCategoryEntity> {

    @Select("select tic.* from tbl_impact_categories tic left join tbl_impact_links til on tic.id = til.F_IMPACT_CATEGORY where til.F_IMPACT_METHOD = #{impactId}")
    List<ImpactCategoryEntity> getImpactCategoryByRefId(Long impactId);

}